{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{:config('tuchuang.site_title')}－{:config('common.site_name')}</title>
<meta name="keywords" content="{:config('tuchuang.site_keywords')}" />
<meta name="description" content="{:config('tuchuang.site_description')}"  />
{/block}
{block name="header"}{include file="widget/header" /}{/block}
<!--main -->
{block name="main"}
<div class="container pt-5">
    <h1 class="text-center mb-4">{:config('tuchuang.site_name')}</h1>
    <p class="lead text-center text-muted mb-5">{:config('tuchuang.site_description')}</p>
    <form action="{:DcUrl('tuchuang/apis/change')}" method="get" data-toggle="form" data-callback="imageChange">
      <div class="input-group">
        <input class="form-control" type="text" name="url" id="url" placeholder="请上传图片或输入待加速的图片外链地址" autocomplete="off" required>
        <div class="input-group-append" id="group-upload">
          <button class="btn btn-outline-purple dc-upload" type="button" data-toggle="upload" data-prefix="{:DcUploadPrefix()}" data-mime-types="image/*" data-max-size="{$Think.config.common.upload_max_size|default='5mb'}" data-url="{$path_upload}" data-multiple="false" data-on-success="uploadSuccess" data-on-error="uploadError" data-on-complete="uploadComplete">上传</button>
        </div>
        <div class="input-group-append">
          <button class="btn btn-purple" type="submit">加速</button>
        </div>
      </div>
    </form>
    <div class="alert alert-secondary text-break mt-3 d-none" id="alert">
      <div class="w-100 d-flex justify-content-between align-items-center">
        <div id="shareUrl">loading...</div>
        <button class="btn btn-sm btn-outline-dark btn-copy" data-target="#shareUrl">复制</button>
      </div>
    </div>
    <div class="row mt-5">
      <div class="col-md-4 mb-5">
        <h6 class="mb-3">
          <i class="text-purple fa fa-fw fa-upload"></i>
          <a href="{:DcUrl('tuchuang/index/index')}">图片免费上传</a>
        </h6>
        <p class="text-muted">支持本地储存、FTP储存、第三方云储存（阿里云 OSS、腾讯云 COS、七牛云等）。</p>
      </div>
      <div class="col-md-4 mb-5">
        <h6 class="mb-3">
          <i class="text-purple fa fa-fw fa-cloud"></i>
          <a href="{:DcUrl('tuchuang/index/index')}">图片外链加速</a>
        </h6>
        <p class="text-muted">一键转换第三方网站的图片外链地址为{:config('tuchuang.site_name')}可分享的图片地址（支持CDN）。</p>
      </div>
      <div class="col-md-4 mb-5">
        <h6 class="mb-3">
          <i class="text-purple fa fa-fw fa-image"></i>
          <a href="{:DcUrl('tuchuang/index/index')}">图片解析服务</a>
        </h6>
        <p class="text-muted">直接将第三方外链图片地址显示为图片、支持多种缓存方式，可有效破解图片防盗链功能。</p>
      </div>
      <div class="col-md-4 mb-5">
        <h6 class="mb-3 text-dark">
          <i class="text-purple fa fa-fw fa-folder"></i>
          <a href="{:DcUrl('tuchuang/index/upload')}" title="呆错图床上传接口">API上传接口</a>
        </h6>
        <p class="text-muted">通过API上传接口可以将本地图片上传至{:config('tuchuang.site_name')}并以JSON格式返回图片的真实地址。</p>
      </div>
      <div class="col-md-4 mb-5">
        <h6 class="mb-3 text-dark">
          <i class="text-purple fa fa-fw fa-file"></i>
          <a href="{:DcUrl('tuchuang/index/change')}" title="呆错图床转换接口">API转换接口</a>
        </h6>
        <p class="text-muted">通过API转换接口可以将第三方图片外链以JSON格式返回{:config('tuchuang.site_name')}可分享的图片真实地址。</p>
      </div>
      <div class="col-md-4 mb-5">
        <h6 class="mb-3 text-dark">
          <i class="text-purple fa fa-fw fa-angellist"></i>
          <a href="{:DcUrl('tuchuang/index/parse')}" title="呆错图床解析接口">API解析接口</a>
        </h6>
        <p class="text-muted">通过API解析接口以JSON格式返回加密后的图床解析入口地址，支持自定义加密函数与解密函数。</p>
      </div>
    </div>
</div>
{/block}
{block name="footer"}{include file="widget/footer" /}{/block}